﻿@model WordSmith_V1.ViewModel.BookChapterCreateViewModel

@{
    ViewBag.Title = "Create";
    Layout = "~/Views/Shared/_AuthenticatedPagesLayout.cshtml";
}

<h2>Create</h2>

<script src="@Url.Content("~/Scripts/jquery.validate.min.js")" type="text/javascript"></script>
<script src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)
    <fieldset>
        <legend>Add Chapter</legend>
        <div class="hidden">
            Model.authorId
        </div>
        <div class="editor-label">
            @Html.LabelFor(model => model.ChapterTitle)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.ChapterTitle)
            @Html.ValidationMessageFor(model => model.ChapterTitle)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Description)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Description)
            @Html.ValidationMessageFor(model => model.Description)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.CoverImage)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.CoverImage)
            
        </div>

         <!---------             GENRE        ----------->
    <div style="padding: 10px 0px">
        <label for="genre_list">
            genre:
        </label>
        @Html.DropDownListFor(x => x.selectedGenre, new SelectList(@ViewBag.genreList, "Value", "Text"))
    </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.Tags)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.Tags)
            @Html.ValidationMessageFor(model => model.Tags)
        </div>

       

        <div class="editor-label">
            @Html.LabelFor(model => model.Writing)
        </div>
        <div class="editor-field">
            @Html.TextAreaFor(model => model.Writing,new { rows = "30", cols = "65" })
            @Html.ValidationMessageFor(model => model.Writing)
        </div>

       
        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>
